package com.itboye.mengwu.data.repository;

import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import com.google.gson.reflect.TypeToken;
import com.itboye.mengwu.data.interfaces.IAddGoods;
import com.itboye.mengwu.data.interfaces.ILuntanTotal;
import com.itboye.mengwu.data.model.BaoBaoLePingLunAndHuiFuModel;
import com.itboye.mengwu.data.model.GoodsListModel;
import com.itboye.mengwu.data.model.HuiFuDetailModel;
import com.itboye.mengwu.data.model.HuiFuReturnModel;
import com.itboye.mengwu.data.model.LuntanTieZiBean;
import com.itboye.mengwu.data.model.MePingLunbean;
import com.itboye.mengwu.data.model.MyCommentsModel;
import com.itboye.mengwu.data.model.MyTiezibean;
import com.itboye.mengwu.data.model.PingLunHuiFuModel;
import com.itboye.mengwu.data.model.QueryCollectionModel;
import com.itboye.mengwu.data.model.TieZiBaoHanReply;
import com.itboye.mengwu.data.model.TieZiBaoHanReply.GetAList;
import com.itboye.mengwu.data.model.TieZiBaoHanReplyBaoBaoLe;
import com.itboye.mengwu.data.model.TieZiModel;
import com.itboye.mengwu.data.model.TieZiPublish;

import android.util.Log;

import com.itboye.core.interfaces.ICompleteListener;
import com.itboye.core.utils.BaseErrorListener;
import com.itboye.core.utils.BaseSuccessReqListener;
import com.itboye.core.utils.ByJsonRequest.Builder;

public class LuntanRepository extends BaseNetRepository implements
		ILuntanTotal<LuntanTieZiBean> {
	public static final String LuntanBanKuaiFenye = "BY_ForumForum_query";// 11.1板块分页
	public static final String ZhutiFenYe = "BY_ForumThread_query";// 11.2帖子分页
	public static final String BaobaoLe = "BY_ForumThread_queryBBL";// 宝宝乐
	public static final String FaBiaoZhuTi = "BY_ForumThread_add";// 11.3 发表主题
	public static final String DeleteSubject = "BY_ForumThread_delete";// 11.4删除主题
	public static final String collection = "BY_ForumThread_favorites";// 11.5是否收藏
	public static final String CollectionFenyeQuery = "BY_ForumThread_getFavorites";// 11.6
	public static final String dianzan = "BY_ForumThread_like"; // 11.7 主题点赞
	public static final String zhutiDetail = "BY_ForumThread_detail";// 11.8主题详情
	public static final String BaoBaiLetiDetailComment = "BY_ForumPost_postBBL";// 宝宝乐帖子详情评论及回复
	public static final String TieZiAddJIng = "BY_ForumThread_digest";// 11.9帖子定置
	public static final String QueryMyTiezi = "BY_BbsUserCenter_queryThread";// 查询我的帖子
	public static final String TieZihiDing = "BY_ForumThread_digest";// 11.9帖子定置
	public static final String PingLun = "BY_ForumPost_reply";// 12.1 回复帖子
	public static final String guanzhu = "BY_User_focus";// 关注用户
	public static final String HuifuPingLun = "BY_ForumPost_replyPost";// 回复评论
	private static final String DeleteComment = "BY_ForumPost_delete";// 删除回复
	private static final String DeleteHuiFu = "BY_ForumPost_deleteComment";// 删除评论

	private static final String queryComment = "BY_BbsUserCenter_queryComment";//
	public static final String getHuiFuOrCommentsBaoBaoLe = "BY_ForumPost_postBBL";// 查询宝宝乐的回复或者评论
	public static final String getHuiFuOrCommentsDetail = "BY_ForumPost_detail";// 查询回复详情
	public static final String BiaoQian = "BY_ForumThread_tag";// 查询标签

	public static final String ShopCarFaBu = "BY_Product_commentGift";// 我的评价发布接口
	public static final String DeleteImage = "BY_File_delPic";// 删除图片
	public static final String editTiezi = "BY_ForumThread_edit";// 时光机修改帖子
	String api = "100";

	public LuntanRepository(ICompleteListener listener) {
		// TODO Auto-generated constructor stub
		super(listener);
	}

	// 11.1 板块分页
	@Override
	public void getInfo(LuntanTieZiBean model) {
		// TODO Auto-generated method stub
		Type type = new TypeToken<LuntanTieZiBean>() {
		}.getType();
		String apiVer = api;
		Map<String, Object> map = new HashMap<String, Object>();
		// map.put("page_size", "10");//每页大小，默认10
		map.put("fresh", model.getFresh());// 每页大小，默认10
		// map.put("fup", "1");//上级论坛
		// map.put("page_no", 1);//页码，默认1
		// map.put("img_num", "");////返回最新主题帖的图片个默认3
		(new Builder<LuntanTieZiBean>())
				.setTypeVerParamsAndReturnClass(LuntanBanKuaiFenye, apiVer,
						map, type)
				.requestListener(
						new BaseSuccessReqListener<LuntanTieZiBean>(
								getListener()))
				.errorListener(new BaseErrorListener(getListener()))
				.desEncodeThenBuildAndSend();
	}

	// 11.3 发表主题
	@Override
	public void add(LuntanTieZiBean model) {
		Type type = new TypeToken<TieZiPublish>() {
		}.getType();
		String apiVer = "101";
		Map<String, Object> map = new HashMap<String, Object>();
		map.put("fid", model.getFid());// 论坛id 是
		// map.put("typeid", model.getTypeid());//主题分类id 是
		map.put("author", model.getAuthor());// 昵称（nickname）是
		map.put("message", model.getMessage());// 主题帖内容 是
		map.put("subject", model.getSubject());// 标题 是
		map.put("author_id", model.getUid());// 用户id（uid）是
		map.put("tags", model.getTags());//
		if (model.getAttachments() != null)
			map.put("attachments", model.getAttachments());// 图片附件组(eg:1,3,4)由上传图片后返回的各图片id组合而成，若无则不传

		(new Builder<LuntanTieZiBean>())
				.setTypeVerParamsAndReturnClass(FaBiaoZhuTi, apiVer, map, type)
				.requestListener(
						new BaseSuccessReqListener<LuntanTieZiBean>(
								getListener()))
				.errorListener(new BaseErrorListener(getListener()))
				.desEncodeThenBuildAndSend();
	}

	/***
	 * 11.4 删除主题
	 */
	@Override
	public void delete(LuntanTieZiBean model) {
		Type type = new TypeToken<TieZiPublish>() {
		}.getType();
		String apiVer = "101";
		Map<String, Object> map = new HashMap<String, Object>();
		map.put("tid", model.getTid());// 主题帖id
		map.put("uid", model.getUid());// 用户id（uid）
		(new Builder<String>())
				.setTypeVerParamsAndReturnClass(DeleteSubject, apiVer, map,
						type)
				.requestListener(
						new BaseSuccessReqListener<String>(getListener()))
				.errorListener(new BaseErrorListener(getListener()))
				.desEncodeThenBuildAndSend();

	}

	/***
	 * 我的帖子
	 */
	@Override
	public void update(LuntanTieZiBean model) {
		// TODO Auto-generated method stub

		Type type = new TypeToken<ArrayList<MyTiezibean>>() {
		}.getType();
		String apiVer = api;
		Map<String, Object> map = new HashMap<String, Object>();// page_no否
																// page_size否
																// uid否
																// img_num返回最新主题帖的图片个数默认3
		map.put("uid", model.getUid());
		(new Builder<ArrayList<MyTiezibean>>())
				.setTypeVerParamsAndReturnClass(QueryMyTiezi, apiVer, map, type)
				.requestListener(
						new BaseSuccessReqListener<ArrayList<MyTiezibean>>(
								getListener()))
				.errorListener(new BaseErrorListener(getListener()))
				.desEncodeThenBuildAndSend();

	}

	@Override
	public List<LuntanTieZiBean> queryYouHuiQuan(LuntanTieZiBean model) {
		// TODO Auto-generated method stub
		return null;
	}

	/**
	 * 11.2 帖子分页
	 */
	@Override
	public void zhuTiFenye(LuntanTieZiBean bean) {
		// TODO Auto-generated method stub
		Type type = new TypeToken<TieZiBaoHanReply>() {
		}.getType();
		String apiVer = api;
		Map<String, Object> map = new HashMap<String, Object>();
		// map.put("page_size", "10");//每页大小，默认10
		map.put("fid", bean.getFid());// 论坛id
		map.put("uid", bean.getUid());
		map.put("max_reply", bean.getMaxReply());
		// map.put("name", "");//搜索用 模糊查询
		map.put("page_no", bean.getPage_no());// 页码，默认1
		// map.put("img_num", "");////返回最新主题帖的图片个默认3
		// map.put("stick", 0);//是否查询置顶主题 0 查询不包含置顶主题的所有主题 1 之查询置顶主题 默认查询所有
		(new Builder<TieZiBaoHanReply>())
				.setTypeVerParamsAndReturnClass(ZhutiFenYe, apiVer, map, type)
				.requestListener(
						new BaseSuccessReqListener<TieZiBaoHanReply>(
								getListener()))
				.errorListener(new BaseErrorListener(getListener()))
				.desEncodeThenBuildAndSend();
	}

	// 11.5 是否收藏
	@Override
	public void favorite(String tid, String uid, String value) {
		// TODO Auto-generated method stub
		Type type = new TypeToken<String>() {
		}.getType();
		String apiVer = api;
		Map<String, Object> map = new HashMap<String, Object>();
		map.put("tid", tid);// 主题帖id
		map.put("uid", uid);// 用户id（uid）
		map.put("favorite_value", value);// 是 值为0是为取消收藏，值为1时收藏
		(new Builder<String>())
				.setTypeVerParamsAndReturnClass(collection, apiVer, map, type)
				.requestListener(
						new BaseSuccessReqListener<String>(getListener()))
				.errorListener(new BaseErrorListener(getListener()))
				.desEncodeThenBuildAndSend();
	}

	/**
	 * 11.6 收藏分页
	 */
	@Override
	public void queryCollection(String uid, String fid, String pageNo,
			String pageSize) {
		// TODO Auto-generated method stub
		Type type = new TypeToken<QueryCollectionModel>() {
		}.getType();
		String apiVer = api;
		Map<String, Object> map = new HashMap<String, Object>();// page_no否
																// page_size否
																// uid否
																// img_num返回最新主题帖的图片个数默认3
		map.put("uid", uid);
		map.put("fid", fid);
		map.put("page_no", pageNo);
		map.put("page_size", pageSize);
		(new Builder<QueryCollectionModel>())
				.setTypeVerParamsAndReturnClass(CollectionFenyeQuery, apiVer,
						map, type)
				.requestListener(
						new BaseSuccessReqListener<QueryCollectionModel>(
								getListener()))
				.errorListener(new BaseErrorListener(getListener()))
				.desEncodeThenBuildAndSend();
	}

	/**
	 * 11.7 主题点赞
	 */
	@Override
	public void dianzan(String uid, String like, String tid) {
		Type type = new TypeToken<String>() {
		}.getType();
		String apiVer = "101";
		Map<String, Object> map = new HashMap<String, Object>();// page_no否
																// page_size否
																// uid否
																// img_num返回最新主题帖的图片个数默认3
		map.put("tid", tid);// 主题帖id
		map.put("uid", uid);// 用户id（uid）
		map.put("like_value", like);// 点赞值
		(new Builder<String>())
				.setTypeVerParamsAndReturnClass(dianzan, apiVer, map, type)
				.requestListener(
						new BaseSuccessReqListener<String>(getListener()))
				.errorListener(new BaseErrorListener(getListener()))
				.desEncodeThenBuildAndSend();
	}

	/**
	 * 11.8主题详情
	 */
	@Override
	public void zhutiXiangqing(String uid, String tid, String maxPingLun) {
		// TODO Auto-generated method stub
		Type type = new TypeToken<GetAList>() {
		}.getType();
		String apiVer = api;
		Map<String, Object> map = new HashMap<String, Object>();// page_no否
		map.put("tid", tid);// 主题帖id
		map.put("uid", uid);// 用户id（uid）
		map.put("max_reply", 100);
		map.put("max_comment", 3);
		(new Builder<GetAList>())
				.setTypeVerParamsAndReturnClass(zhutiDetail, apiVer, map, type)
				.requestListener(
						new BaseSuccessReqListener<GetAList>(getListener()))
				.errorListener(new BaseErrorListener(getListener()))
				.desEncodeThenBuildAndSend();
	}

	// 回复帖子
	@Override
	public void pinglun(String fid, String tid, String authorId,
			String comment, StringBuilder attachments, String subject) {
		// TODO Auto-generated method stub
		Type type = new TypeToken<HuiFuReturnModel>() {
		}.getType();
		String apiVer = "101";
		Map<String, Object> map = new HashMap<String, Object>();// page_no否
																// page_size否
																// uid否
																// img_num返回最新主题帖的图片个数默认3
		map.put("tid", tid);// 主题帖id
		map.put("fid", fid);// 用户id（uid）
		map.put("author_id", authorId);
		map.put("message", comment);
		if (attachments != null)
			map.put("attachments", attachments);
		(new Builder<HuiFuReturnModel>())
				.setTypeVerParamsAndReturnClass(PingLun, apiVer, map, type)
				.requestListener(
						new BaseSuccessReqListener<HuiFuReturnModel>(
								getListener()))
				.errorListener(new BaseErrorListener(getListener()))
				.desEncodeThenBuildAndSend();
	}

	@Override
	public void huiFuPingLun(String fid, String pid, String tid,
			String authorId, String comment, String toUid) {
		// TODO Auto-generated method stub
		Type type = new TypeToken<PingLunHuiFuModel>() {
		}.getType();
		String apiVer = api;
		Map<String, Object> map = new HashMap<String, Object>();// page_no否
																// page_size否
																// uid否
																// img_num返回最新主题帖的图片个数默认3
		map.put("fid", fid);
		map.put("tid", tid);// 主题帖id
		map.put("pid", pid);// 回复id
		map.put("author_id", authorId);
		map.put("comment", comment);
		map.put("to_uid", toUid);
		// if(attachments!=null)
		// map.put("attachments", attachments);
		(new Builder<PingLunHuiFuModel>())
				.setTypeVerParamsAndReturnClass(HuifuPingLun, apiVer, map, type)
				.requestListener(
						new BaseSuccessReqListener<PingLunHuiFuModel>(
								getListener()))
				.errorListener(new BaseErrorListener(getListener()))
				.desEncodeThenBuildAndSend();
	}

	/**
	 * 
	 */
	@Override
	public void deletePingLun(String uid, String fid, String tid, String pid) {
		// TODO Auto-generated method stub
		Type type = new TypeToken<HuiFuReturnModel>() {
		}.getType();
		String apiVer = "101";
		Map<String, Object> map = new HashMap<String, Object>();// page_no否
																// page_size否
																// uid否
																// img_num返回最新主题帖的图片个数默认3
		map.put("fid", fid);
		map.put("tid", tid);
		map.put("pid", pid);
		map.put("uid", uid);
		(new Builder<HuiFuReturnModel>())
				.setTypeVerParamsAndReturnClass(DeleteComment, apiVer, map,
						type)
				.requestListener(
						new BaseSuccessReqListener<HuiFuReturnModel>(getListener()))
				.errorListener(new BaseErrorListener(getListener()))
				.desEncodeThenBuildAndSend();
	}

	@Override
	public void selseceTiezi(String uid) {
		// TODO Auto-generated method stub
		Type type = new TypeToken<TieZiBaoHanReply>() {
		}.getType();
		String apiVer = api;
		Map<String, Object> map = new HashMap<String, Object>();// page_no否
																// page_size否
																// uid否
																// img_num返回最新主题帖的图片个数默认3
		map.put("uid", uid);
		(new Builder<TieZiBaoHanReply>())
				.setTypeVerParamsAndReturnClass(QueryMyTiezi, apiVer, map, type)
				.requestListener(
						new BaseSuccessReqListener<TieZiBaoHanReply>(
								getListener()))
				.errorListener(new BaseErrorListener(getListener()))
				.desEncodeThenBuildAndSend();
	}

	@Override
	public void guanzhu(String uid, String bUid, String value) {
		// TODO Auto-generated method stub
		Type type = new TypeToken<String>() {
		}.getType();
		String apiVer = api;
		Map<String, Object> map = new HashMap<String, Object>();// page_no否
																// page_size否
																// uid否
																// img_num返回最新主题帖的图片个数默认3
		map.put("uid", uid);
		map.put("value", value);
		map.put("focus_uid", bUid);
		(new Builder<String>())
				.setTypeVerParamsAndReturnClass(guanzhu, apiVer, map, type)
				.requestListener(
						new BaseSuccessReqListener<String>(getListener()))
				.errorListener(new BaseErrorListener(getListener()))
				.desEncodeThenBuildAndSend();
	}

	@Override
	public void MePingLun(String uid) {
		// TODO Auto-generated method stub
		Type type = new TypeToken<MePingLunbean>() {
		}.getType();
		String apiVer = api;
		Map<String, Object> map = new HashMap<String, Object>();
		// map.put("page_size", "10");//每页大小，默认10
		map.put("uid", uid);
		// map.put("name", "");//搜索用 模糊查询
		// map.put("page_no", 1);//页码，默认1
		// map.put("img_num", "");////返回最新主题帖的图片个默认3
		// map.put("stick", 0);//是否查询置顶主题 0 查询不包含置顶主题的所有主题 1 之查询置顶主题 默认查询所有
		(new Builder<MePingLunbean>())
				.setTypeVerParamsAndReturnClass(queryComment, apiVer, map, type)
				.requestListener(
						new BaseSuccessReqListener<MePingLunbean>(getListener()))
				.errorListener(new BaseErrorListener(getListener()))
				.desEncodeThenBuildAndSend();
	}

	@Override
	public void MyTieZi(String uid) {
		// TODO Auto-generated method stub
		Type type = new TypeToken<ArrayList<TieZiBaoHanReply>>() {
		}.getType();
		String apiVer = api;
		Map<String, Object> map = new HashMap<String, Object>();// page_no否
																// page_size否
																// uid否
																// img_num返回最新主题帖的图片个数默认3
		map.put("uid", uid);
		(new Builder<ArrayList<TieZiBaoHanReply>>())
				.setTypeVerParamsAndReturnClass(QueryMyTiezi, apiVer, map, type)
				.requestListener(
						new BaseSuccessReqListener<ArrayList<TieZiBaoHanReply>>(
								getListener()))
				.errorListener(new BaseErrorListener(getListener()))
				.desEncodeThenBuildAndSend();
	}

	@Override
	public void getBabayLe(String uid, String fid, String pageNo,String fresh) {
		// TODO Auto-generated method stub
		Type type = new TypeToken<TieZiBaoHanReplyBaoBaoLe>() {
		}.getType();
		String apiVer = api;
		Map<String, Object> map = new HashMap<String, Object>();
		// map.put("page_size", "10");//每页大小，默认10
		// map.put("fid", fid);// 论坛id
		map.put("uid", uid);
		map.put("fid", fid);
		map.put("fresh", fresh);
		// map.put("name", "");//搜索用 模糊查询
		map.put("page_no", pageNo);// 页码，默认1
		// map.put("img_num", "");////返回最新主题帖的图片个默认3
		// map.put("stick", 0);//是否查询置顶主题 0 查询不包含置顶主题的所有主题 1 之查询置顶主题 默认查询所有
		(new Builder<TieZiBaoHanReplyBaoBaoLe>())
				.setTypeVerParamsAndReturnClass(BaobaoLe, apiVer, map, type)
				.requestListener(
						new BaseSuccessReqListener<TieZiBaoHanReplyBaoBaoLe>(
								getListener()))
				.errorListener(new BaseErrorListener(getListener()))
				.desEncodeThenBuildAndSend();
	}

	@Override
	public void getBaoBaoLePinglunAndHuiFu(String tid) {
		// TODO Auto-generated method stub
		Type type = new TypeToken<BaoBaoLePingLunAndHuiFuModel>() {
		}.getType();
		String apiVer = api;
		Map<String, Object> map = new HashMap<String, Object>();
		// map.put("page_size", "10");//每页大小，默认10
		// map.put("fid", fid);// 论坛id
		map.put("tid", tid);
		(new Builder<BaoBaoLePingLunAndHuiFuModel>())
				.setTypeVerParamsAndReturnClass(getHuiFuOrCommentsBaoBaoLe,
						apiVer, map, type)
				.requestListener(
						new BaseSuccessReqListener<BaoBaoLePingLunAndHuiFuModel>(
								getListener()))
				.errorListener(new BaseErrorListener(getListener()))
				.desEncodeThenBuildAndSend();
	}

	@Override
	public void deleteComment(String uid, String tid, String pid, String cid) {
		// TODO Auto-generated method stub

		Type type = new TypeToken<String>() {
		}.getType();
		String apiVer = api;
		Map<String, Object> map = new HashMap<String, Object>();
		// map.put("page_size", "10");//每页大小，默认10
		// map.put("fid", fid);// 论坛id
		map.put("uid", uid);
		map.put("tid", tid);
		map.put("pid", pid);
		map.put("cid", cid);
		(new Builder<String>())
				.setTypeVerParamsAndReturnClass(DeleteHuiFu, apiVer, map, type)
				.requestListener(
						new BaseSuccessReqListener<String>(getListener()))
				.errorListener(new BaseErrorListener(getListener()))
				.desEncodeThenBuildAndSend();
	}

	@Override
	public void baoBaoLeDetailComment(String uid, String tid) {
		// TODO Auto-generated method stub
		Type type = new TypeToken<BaoBaoLePingLunAndHuiFuModel>() {
		}.getType();
		String apiVer = api;
		Map<String, Object> map = new HashMap<String, Object>();// page_no否
																// page_size否
																// uid否
																// img_num返回最新主题帖的图片个数默认3
		map.put("tid", tid);// 主题帖id
		map.put("uid", uid);// 用户id（uid）
		map.put("max_reply", 100);
		(new Builder<BaoBaoLePingLunAndHuiFuModel>())
				.setTypeVerParamsAndReturnClass(BaoBaiLetiDetailComment,
						apiVer, map, type)
				.requestListener(
						new BaseSuccessReqListener<BaoBaoLePingLunAndHuiFuModel>(
								getListener()))
				.errorListener(new BaseErrorListener(getListener()))
				.desEncodeThenBuildAndSend();
	}

	@Override
	public void getHuiFuDetail(String fid, String tid, String pid) {
		// TODO Auto-generated method stub
		Type type = new TypeToken<HuiFuDetailModel>() {
		}.getType();
		String apiVer = api;
		Map<String, Object> map = new HashMap<String, Object>();
		map.put("tid", tid);// 帖子tid
		map.put("fid", fid);// 版块fid（fid）
		map.put("pid", pid);// 评论ID
		(new Builder<HuiFuDetailModel>())
				.setTypeVerParamsAndReturnClass(getHuiFuOrCommentsDetail,
						apiVer, map, type)
				.requestListener(
						new BaseSuccessReqListener<HuiFuDetailModel>(
								getListener()))
				.errorListener(new BaseErrorListener(getListener()))
				.desEncodeThenBuildAndSend();
	}

	@Override
	public void TieZiBiaoQian(String uid, String tag_id, String fid,
			String page_no) {
		// TODO Auto-generated method stub
		Type type = new TypeToken<TieZiBaoHanReply>() {
		}.getType();
		String apiVer = api;
		Map<String, Object> map = new HashMap<String, Object>();
		map.put("tag_id", tag_id);// baioqiantid
		map.put("uid", uid);// baioqianuid
		map.put("fid", fid);// baioqianfid
		map.put("page_no", page_no);// baioqiantpage_size
		(new Builder<TieZiBaoHanReply>())
				.setTypeVerParamsAndReturnClass(BiaoQian, apiVer, map, type)
				.requestListener(
						new BaseSuccessReqListener<TieZiBaoHanReply>(
								getListener()))
				.errorListener(new BaseErrorListener(getListener()))
				.desEncodeThenBuildAndSend();

	}

	@Override
	public void ShopPingJia(String uid, String pid, String content) {
		// TODO Auto-generated method stub ShopCarFaBu
		Type type = new TypeToken<String>() {
		}.getType();
		String apiVer = api;
		Map<String, Object> map = new HashMap<String, Object>();
		map.put("pid", pid);// baioqiantid
		map.put("uid", uid);// baioqianuid
		map.put("content", content);// baioqianfid
		(new Builder<String>())
				.setTypeVerParamsAndReturnClass(ShopCarFaBu, apiVer, map, type)
				.requestListener(
						new BaseSuccessReqListener<String>(getListener()))
				.errorListener(new BaseErrorListener(getListener()))
				.desEncodeThenBuildAndSend();
	}

	@Override
	public void deleteImage(String uid, String tid, String imgId) {
		// TODO Auto-generated method stub
		Type type = new TypeToken<String>() {
		}.getType();
		String apiVer = api;
		Map<String, Object> map = new HashMap<String, Object>();
		map.put("tid", tid);// baioqiantid
		map.put("uid", uid);// baioqianuid
		map.put("imgs", imgId);// baioqianfid
		(new Builder<String>())
				.setTypeVerParamsAndReturnClass(DeleteImage, apiVer, map, type)
				.requestListener(
						new BaseSuccessReqListener<String>(getListener()))
				.errorListener(new BaseErrorListener(getListener()))
				.desEncodeThenBuildAndSend();
	}

	@Override
	public void editMyTieZi(String uid, String tid, String message,
			String stringBuilder) {
		// TODO Auto-generated method stub
		Type type = new TypeToken<String>() {
		}.getType();
		String apiVer = api;
		Map<String, Object> map = new HashMap<String, Object>();
		map.put("tid", tid);// baioqiantid
		map.put("uid", uid);// baioqianuid
		map.put("message", message);// baioqianfid
		map.put("attachments", stringBuilder);
		(new Builder<String>())
				.setTypeVerParamsAndReturnClass(editTiezi, apiVer, map, type)
				.requestListener(
						new BaseSuccessReqListener<String>(getListener()))
				.errorListener(new BaseErrorListener(getListener()))
				.desEncodeThenBuildAndSend();
	}

}
